﻿using Shared.Domain.Abstructs;
using Domain.Roles.Entities;
namespace Domain.UserRole.Entities
{
    public class UserRole : BaseEntity<Guid>
    {
        public Guid UserId { get; }

        public ICollection<Role> Roles { get; }

        private UserRole(Guid UserId, ICollection<Role> Roles)
        {
            this.UserId = UserId;
            this.Roles = Roles;
        }

        public static UserRole Create(Guid userId,ICollection<Role> roles)
        {
            return new UserRole(userId,roles);
        }
    }
}
